package core
{
	import control.BankPanelControl;
	import control.BrokenPanelControl;
	import control.FamousPanelControl;
	import control.ItemPanelControl;
	import control.KeyBoardControl;
	import control.SceneControl;
	import control.SoundControl;
	import control.face.EmoteControl;
	import control.face.HintControl;
	import control.hall.HallControl;
	import control.hall.PlayerInfoModulControl;
	import control.hall.PlayerListControl;
	import control.hall.RankModulControl;
	import control.hall.RoomListControl;
	import control.hall.SeachControl;
	import control.panel.AddFriendPanelControl;
	import control.panel.AlertButPanelControl;
	import control.panel.AlertPanelControl;
	import control.panel.AlertYesNoPanelControl;
	import control.panel.CardRecordPanelControl;
	import control.panel.DebugPanelContorl;
	import control.panel.EmotePanelControl;
	import control.panel.FamusRemarkControl;
	import control.panel.FastReplayPanelControl;
	import control.panel.FeedPanelControl;
	import control.panel.FriendPanelControl;
	import control.panel.HelpPanelControl;
	import control.panel.ItemShortcutPanelControl;
	import control.panel.PlayPanelControl;
	import control.panel.PlayerItemPanelControl;
	import control.panel.ResultPanelControl;
	import control.panel.RewardPanelControl;
	import control.panel.RoomInfoPanelControl;
	import control.panel.SitInfoPanelControl;
	import control.panel.TaskPanelControl;
	import control.panel.VipSetPanelControl;
	import control.panel.prompt.IPromptPanelSelectCombineCardsControl;
	import control.panel.prompt.PromptPanelSelectCombineCardsControl;
	import control.panel.prompt.ServerPromptPanelControl;
	import control.sit.SitControl;
	import control.table.GiftControl;
	import control.table.MailControl;
	import control.table.TableControl;
	import control.table.TableFlyGoldControl;

	public class Control
	{
		private static var instance:Control;
		
		public function Control()
		{
			if (instance)
			{
				throw Error("单列!");
			}
			
		}
		
		public static function getInstance():Control
		{
			if (instance == null) instance = new Control();
			return instance;
		}
		
		//----------------
		
		
		private var _model:Model = Model.getInstance();
		private var _view:View = View.getInstance();
		
		public var sceneControl:SceneControl;
		
		public var promptPanelSelectCombineCardsControl:IPromptPanelSelectCombineCardsControl;
		public var sitControl:SitControl;
		public var tableControl:TableControl;
		
		public var playPanelControl:PlayPanelControl;
		public var roomInfoPanelControl:RoomInfoPanelControl;
		
		public var hintControl:HintControl;
		public var keyboardControl:KeyBoardControl;
		
		public var famusRemarkControl:FamusRemarkControl;
		public var resultPanelControl:ResultPanelControl;
		public var tableFlyGoldControl:TableFlyGoldControl;
		public var emotePanelControl:EmotePanelControl;
		public var emoteControl:EmoteControl;
		public var fastReplayPanelControl:FastReplayPanelControl;
		public var soundControl:SoundControl;
		public var serverPromptPanelControl:ServerPromptPanelControl;
		public var hallControl:HallControl;
		
		public var addFriendPanelControl:AddFriendPanelControl;
		public var mailControl:MailControl;
		public var friendPanelControl:FriendPanelControl;
		public var feedPanelControl:FeedPanelControl;
		public var helpPanelControl:HelpPanelControl;
		public var playerItemPanelControl:PlayerItemPanelControl;
		public var alertPanelControl:AlertPanelControl;
		public var alertButPanelControl:AlertButPanelControl;
		public var debugPanelControl:DebugPanelContorl;
		public var itemPanelControl:ItemPanelControl;
		public var rewardPanelControl:RewardPanelControl;
		public var itemShortCutPanelControl:ItemShortcutPanelControl;
		public var cardRecordPanelControl:CardRecordPanelControl;
		public var taskPanelControl:TaskPanelControl;
		public var bankPanelControl:BankPanelControl;
		public var alertYesNoPanelControl:AlertYesNoPanelControl;
		public var vipSetPanelControl:VipSetPanelControl;
		public var famousPanelControl:FamousPanelControl;
		public var giftControl:GiftControl;
		public var sitInfoPanelControl:SitInfoPanelControl;
		public var brokenPanelControl:BrokenPanelControl;
		
		//hall
		public var roomsListControl:RoomListControl;
		public var playerListControl:PlayerListControl;
		public var searchControl:SeachControl;
		
		//modul
		public var playerInfoModulControl:PlayerInfoModulControl;
		public var rankModulContorl:RankModulControl;
		
		
		public function initControlls():void
		{
			
			
			debugPanelControl = new DebugPanelContorl();
			alertPanelControl = new AlertPanelControl();
			alertButPanelControl = new AlertButPanelControl();
			
			
			playPanelControl = new PlayPanelControl(_model.playerModel);
			promptPanelSelectCombineCardsControl = new PromptPanelSelectCombineCardsControl();
			sitControl = new SitControl(_model.sitModel);
			tableControl = new TableControl(_model.tableModel);
			roomInfoPanelControl = new RoomInfoPanelControl(_model.tableModel);
			hintControl = new HintControl();
			keyboardControl = new KeyBoardControl(_view.stage);
			famusRemarkControl = new FamusRemarkControl();
			resultPanelControl = new ResultPanelControl();
			tableFlyGoldControl = new TableFlyGoldControl();
			emotePanelControl = new EmotePanelControl();
			emoteControl = new EmoteControl();
			fastReplayPanelControl = new FastReplayPanelControl();
			soundControl = new SoundControl();
			serverPromptPanelControl = new ServerPromptPanelControl();
			hallControl = new HallControl();
			roomsListControl = new RoomListControl();
			playerInfoModulControl = new PlayerInfoModulControl();
			playerListControl = new PlayerListControl();
			searchControl = new SeachControl();
			
			addFriendPanelControl = new AddFriendPanelControl();
			mailControl = new MailControl();
			friendPanelControl = new FriendPanelControl();
			feedPanelControl = new FeedPanelControl();
			helpPanelControl = new HelpPanelControl();
			playerItemPanelControl = new PlayerItemPanelControl();
			itemPanelControl = new ItemPanelControl();
			rewardPanelControl = new RewardPanelControl();
			cardRecordPanelControl = new CardRecordPanelControl();
			famousPanelControl = new FamousPanelControl();
			
			itemShortCutPanelControl = new ItemShortcutPanelControl();
			taskPanelControl = new TaskPanelControl();
			bankPanelControl = new BankPanelControl();
			alertYesNoPanelControl = new AlertYesNoPanelControl();
			vipSetPanelControl = new VipSetPanelControl();
			giftControl = new GiftControl();
			sitInfoPanelControl = new SitInfoPanelControl();
			brokenPanelControl = new BrokenPanelControl();
			
			sceneControl = new SceneControl();
			rankModulContorl = new RankModulControl();
		}
	}
}